package com.pijunn.report

import com.pijunn.label.LabeledItem;
import com.pijunn.shipping.ShippingRate;

class FoundEvent {

    static constraints = {
		item(blank: false)
		finderContact(nullable: true)
		loserContact(nullable: true)
		canContactDirect(nullable: true)
		foundTime(blank: false)
		location(blank: false)
		description(blank:false)
		venue(blank:false)
		locLat(nullable: true)
		locLong(nullable: true)
		notifyFinderTime(nullable: true)
		loserRespondTime(nullable: true)
		rewardAmount(nullable:true)
		shippingAmount(nullable:true)
		handlingAmount(nullable:true)
		shippingRate(nullable:true)
    }
	
	Date foundTime
	String location
	String description
	String venue
	Float locLat	// Latitude
	Float locLong	// Longitude
	Contact finderContact
	Contact loserContact
	Boolean canContactDirect
	Date notifyFinderTime
	Date loserRespondTime
	BigDecimal rewardAmount
	BigDecimal shippingAmount
	BigDecimal handlingAmount
	
	ShippingRate shippingRate
	
	Boolean processShipping
	
	static belongsTo = [item: LabeledItem]
	
	static fetchMode = [item: 'eager']
}
